<template>
<div class="module-page-background" :style="style"></div>
</template>

<script>
export default{
		name:'pagebg',
		props:['base'],				
		computed:{
				style(){
						let bg = '';
						if(this.base.pagebg.bg==2){ bg = 'background:none;';}
						else if(this.base.pagebg.bg==3){
								if(this.base.pagebg.bt==1){ bg = `background:${this.base.pagebg.bc};`; }		
								else if(this.base.pagebg.bt==2 && this.base.pagebg.bi!=''){ bg = `background:url(${this.base.pagebg.bi}) no-repeat center;background-size:cover;`; }		
						}
						return bg;
				} 
		}
}
</script>
